﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Orid.Management.Statistics.Tools.Decomposition.Model
{
    class ModelFrameResult :ModelBase
    {

        internal Guid FrameResultID { get; set; }
        internal Guid Parentid { get; set; }
        internal Guid OrderID { get; set; }
        internal int CategoryID { get; set; }      
        internal int BlockCount 
        { 
            get {
                if (this.resultItem == null)
                    return 0;
                else
                {
                    int fJobcount = resultItem.Count(a => a.JobClass == Logic.JobClassAll.F);
                    if (fJobcount > 0)
                    {
                        return fJobcount;
                    }
                    else
                    {
                        int GJobcount = resultItem.Count(a => a.JobClass == Logic.JobClassAll.G);
                        return GJobcount;

                    }

                }
                    //return this.resultItem.Count / 2 ; 
            } 
        }

        internal Guid FJobID { get; set; }
        internal Guid GJobID { get; set; }
        internal string FLoginName { get; set; }
        internal string GLoginName { get; set; }
        internal double FDuration { get;set; }
        internal double GDuration { get; set; }
        internal DateTime FInputDateTime { get; set; }
        internal DateTime GInputDateTime { get; set; }
        internal string FComment { get; set; }
        internal string GComment { get; set; }

        internal Guid DataStoreID { get; set; }
        internal List<ModelFrameDetailReuslt> resultItem { get; set; }
        internal int FileSize { get; set; }
        internal int X { get; set; }
        internal int Y { get; set; }
        internal int Width { get; set; }
        internal int Height { get; set; }
        internal List<ModelProgress> ListModelProgress{get;set;}
           
        internal Logic.JobClassAll JobClass { get; set; }
             
        internal class ModelFrameDetailReuslt : ModelBase
        {
            internal Logic.JobClassAll JobClass { get; set; }
            internal Rectangle Rect { get; set; }
            internal string Result { get; set; }
            internal bool IsChange { get; set; }
            internal int ImageType { get; set; }
           
           
        }

    }

    
      
}
